<?php
	$Key = $_POST["key"];
?>
<div id="ChuyenMucBaiViet"><?php echo "<td class='hienthi'> Kết quả tìm kiếm với từ khóa: {$Key} </td>"; ?></div>
<?php
	$sqltimkiem = "SELECT *	from baiviet WHERE MATCH(NoiDung) AGAINST('".$Key."' IN BOOLEAN MODE)";
	$danhsach_baiviet = mysql_query($sqltimkiem);
?>
<table class="NoBorder" style="width= 700px;" >
	<?php
		// L?y danh sách bài vi?t thu?c ch? đ?
		while($baiviet = mysql_fetch_array($danhsach_baiviet))
		{
			echo "<tr>";
				echo "<td colspan='2' class='TieuDe'><a href='news.php?do=baivietchitiet&mbv={$baiviet['MaBaiViet']}'><h4>{$baiviet['TieuDe']}</h4></a></td>";
			echo "</tr>";	
			echo "<tr>";
				echo "<td colspan='2' class='NgayDang'>Ngày đăng: {$baiviet['NgayDang']}</td>";
			echo "</tr>";
            $HinhAnhPath = substr($baiviet["HinhAnh"], 3);
            echo "<tr>";
                echo "<td class='HinhAnh'><img width='100' height='100' src='{$HinhAnhPath}' /></td>";
				echo "<td align='justify' class='TomTat'>" . ($baiviet['TomTat']) . "</td>";
			echo "</tr>";
			echo "<tr>";
			echo "<td></td>";
			echo "<td class='btn_more'><a href='news.php?do=baivietchitiet&MCM".$MaCM."&mbv={$baiviet['MaBaiViet']}'> Xem tiếp... </a></td>";
			echo "</tr>";
		}
	?>
 </table>